<!-- 商品设置 -->
<template>
  <div class="pageContent">
    <!-- 商品设置头部 -->
    <div class="shopTitle">
      <div class="shopSetOne">商品设置</div>
      <div class="shopSetTwo">
        <el-button>刷新</el-button>
      </div>
    </div>
    <!-- 内容 -->
    <div class="shopSetContent">
      <div class="shopSetData">
        <div class="dataHead">
          <span>商品设置</span>
        </div>
        <div class="shopSetTime">
          <div class="shopSetTimeOne">
            <div class="shopTimeInfo">
              <span><i>*</i>超过</span>
              <el-input v-model="input1">
                <template slot="append">小时</template>
              </el-input>
              <span>自动请求商品信息</span>
            </div>
            <div class="shopTimeData">
              <span><i>*</i>超过</span>
              <el-input v-model="input2">
                <template slot="append">小时</template>
              </el-input>
              <span>自动请求库存数据</span>
            </div>
          </div>
          <div class="shopSetTimeTwo">
            <el-button type="primary" @click="submitTime">提交</el-button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
  
<script>
import { mapMutations, mapGetters } from 'vuex'
export default {
  name: "shopSet",
  data() {
    return {
      input1: '',
      input2: ''
    };
  },
  created() {
    // console.log(this.$store.state.shop.refreshShopTime);
  },
  computed: {
    ...mapGetters('shop', ['getRefreshShopTime', 'getRefreshStockTime'])
  },
  methods: {
    ...mapMutations('shop', ["SET_REFRESH_SHOP", "SET_REFRESH_STOCK"]),
    submitTime() {
      this.SET_REFRESH_SHOP(this.input1)
      this.SET_REFRESH_STOCK(this.input2)
    }
  }
};
</script>
  
<style scoped>
html div {
  font-size: 14px;
}

::-webkit-scrollbar {
  display: none;
}

.pageContent {
  width: 100%;
  box-sizing: border-box;
  height: 100%;
  /* overflow-y: scroll; */
}

.shopTitle {
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f0f0f0;
}

.shopSetOne {
  height: 26px;
  font-size: 18px;
  font-weight: 400;
  border-left: 6px solid #1cb09a;
  padding-left: 10px;
  margin-left: 20px;
}

.shopSetTwo {
  margin-right: 20px;
}

.shopSetTwo button {
  background-color: #1cb09a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
}

.shopSetContent {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shopSetData {
  width: 95%;
  margin-top: 25px;
  box-sizing: border-box;
  background-color: #f0f0f0;
  border: 1px solid #e4e4e4;
}

.dataHead {
  height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
}

.shopSetTime {
  width: 100%;
  height: 400px;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.shopSetTimeOne .el-input {
  width: 150px;
  margin: 10px 15px;
}

.shopSetTimeOne i {
  color: red;
  margin-right: 5px;
}

.shopSetTimeTwo button {
  padding: 10px 35px;
}
</style>